package com.ruyuan.eshop.data.migrate.tool.service;

import com.alibaba.fastjson.JSONObject;
import com.alibaba.otter.canal.protocol.CanalEntry;
import com.ruyuan.eshop.data.migrate.tool.model.order.OrderItemDO;

import java.util.List;

/**
 * @author zhonghuashishan
 * @version 1.0
 */
public interface TargetOrderItemService {

    /**
     * 获取最大ID
     * @return
     */
    Long getMaxId();

    /**
     * 消费order_item表的binlog数据
     * @param eventType
     * @param beforeData
     * @param afterData
     */
    void consumer(CanalEntry.EventType eventType, JSONObject beforeData, JSONObject afterData);


    /**
     * 同步订单条目数据
     * @param orderItemDOList
     */
    void batchInsert(List<OrderItemDO> orderItemDOList);

}